<script>
    var b = 10;
    (function b() {
        b = 20
        console.log(b)//b函数
    })()
    console.log('----------------')
    var b = 10;
    (function b(b) {
        window.b = 20
        console.log(b)//10
    })(b)
    console.log('----------------')
    var b = 10;
    (function b(b) {
        b.b = 20
        console.log(b)//10
    })(b)
    console.log('----------------')
    var b = 10;
    (function b() {
        b = 20
        var b
        console.log(b)//20
    })()
    console.log('----------------')
    var b = 10;
    (function b(b) {
        b = 20
        console.log(b)//20
    })(b)
</script>